Many performance measurement tools exist in the commercial market each having its own specific capabilities. The most common of these systems perform full code instrumentation (i.e., brute force instrumentation) where performance monitoring is instrumented for all methods of an application. This can be particularly advantageous because it may capture all the calls made by the application during runtime. For example, calls are dynamic and are not part of the static hierarchy of an application program. During application runtime a call may or may not be made. Using the following pseudo-code as an example illustrates why a method call in an application may or may not occur during runtime.
if x . . . {method_left} else {method_right}
In the above pseudo-code, either method_left or method_right is executed depending on the value of variable x. Full code instrumentation provides performance monitoring of all the calls including those to both method_left and method_right and may include monitoring of variable values such as variable x. For this and other reasons, full code instrumentation for performance monitoring is common in conventional systems such as IBM's Rational PurifyPlus (formerly Visual Quantify) and Compuware Corp.'s DevPartner Studio (formerly NuMega).
Applications for mobile devices (mobile applications) present a particular challenge to performance monitoring in that the greater the instrumentation of the application code to be monitored the greater the overhead placed on the application and the limited resources of the mobile device. The limited processor capability and memory/storage for mobile devices such as, for example, personal digital assistants (PDAs) and mobile phones, means that greater instrumentation may result in greater execution times for the application as well as increased memory/storage usage on the mobile device. This may be sufficient to cause the application to fail to execute on the mobile device or the mobile device to crash rather than just a degradation in performance. In addition, the limited memory/storage of most mobile devices prevents extensive logging of the performance monitoring data. The greater the amount of application code instrumented, the greater the amount of memory or storage needed by a performance log file on the mobile device to store the performance monitoring data. Because mobile devices are not always connected to a network, reliance on a server or other remote device to store the logging data may not be adequate to capture the necessary performance monitoring data. In addition, the greater the degree of instrumentation of the application code, the greater the extent to which the performance measurements are skewed by the resource requirements of the performance monitoring. For example, the performance monitoring instrumentation code may be measuring its own resource consumption and impact on the application program.
The present invention presents an innovative method for addressing the challenges of performance monitoring in resource limited environments such as for an application running on a mobile device.